<?php

namespace App\Http\Models\Admin;

use Spatie\Permission\Models\Permission;

class Permission_ extends Permission
{
    //
    // protected $table="permission";
    
    public function classify_belongsToMany()
    {
        //关联的模型类名, 关系字段
        return $this->belongsToMany('App\Http\Models\Admin\ClassifyPermissions','classify_has_permissions','permission_id','classify_id');
    }

    public function hasDetails()
        {
            //关联的模型类名, 关系字段
            return $this->hasOne('App\Http\Models\Admin\PermissionsDetails','permission_id');
        }
}
